/*
 * ============================================================================
 * = COPYRIGHT
 *          PAX Computer Technology(Shenzhen) Co., Ltd. PROPRIETARY INFORMATION
 *   This software is supplied under the terms of a license agreement or nondisclosure
 *   agreement with PAX Computer Technology(Shenzhen) Co., Ltd. and may not be copied or
 *   disclosed except in accordance with the terms in that agreement.
 *     Copyright (C) 2021 PAX Computer Technology(Shenzhen) Co., Ltd. All rights reserved.
 * ============================================================================
 */

import 'package:pigeon/pigeon.dart';


@ConfigurePigeon(PigeonOptions(
    dartOut: 'lib/auto_pigeon/poslink_sdk_report.dart',
    javaOptions: JavaOptions(
      className: 'POSLinkReport',
      package: 'com.example.pos_link.pigeon',
    ),
    objcOptions: ObjcOptions(prefix: ''),
    javaOut: './android/src/main/java/com/example/pos_link/pigeon/POSLinkReport.java',
  ),
)
class ReportLocalTotalReportRequest {
  ReportEdcType? edcType;
  ReportCardType? cardType;
}

class ReportHostDetailReportRequest {
  ReportEdcType? edcType;
  ReportTransactionType? transactionType;
  ReportCardType? cardType;
  String? authorizationCode;
  String? ecrTransactionId;
  String? hostReferenceNumber;
}

class ReportMultiMerchant {
  String? multiMerchantId;
  String? multiMerchantName;
}

class ReportLocalDetailReportRequest {
  ReportEdcType? edcType;
  ReportTransactionType? transactionType;
  ReportCardType? cardType;
  String? recordNumber;
  String? originalReferenceNumber;
  String? authorizationCode;
  String? ecrReferenceNumber;
  String? globalUid;
  ReportLastTransaction? lastTransaction;
  ReportMultiMerchant? multiMerchant;
  ReportTransactionResultType? transactionResultType;
}

class ReportLocalFailedReportRequest {
  String? classID;
}

class ReportSafSummaryReportRequest {
  ReportSafReportIndicator? safIndicator;
}

class ReportHistoryReportRequest {
  String? classID;
}

class ReportHostReportRequest {
  String? classID;
}

class ReportCashTotals {
  String? saleCount;
  String? saleAmount;
  String? returnCount;
  String? returnAmount;
}

class ReportHostReportResponse {
  String? responseCode;
  String? responseMessage;
  String? lineNumber;
  List<String?>? linesMessage;
  String? reportType;
  String? timeStamp;
}

class ReportLoyaltyTotals {
  String? redeemCount;
  String? redeemAmount;
  String? issueCount;
  String? issueAmount;
  String? addCount;
  String? addAmount;
  String? returnCount;
  String? returnAmount;
  String? forcedCount;
  String? forcedAmount;
  String? activateCount;
  String? activateAmount;
  String? deactivateCount;
  String? deactivateAmount;
}

class ReportMotoECommerceResponse {
  ReportMotoECommerceMode? mode;
  ReportMotoECommerceTransactionType? transactionType;
  ReportMotoECommerceSecureType? secureType;
  String? orderNumber;
  String? installments;
  String? currentInstallment;
}

class ReportAvsResponse {
  String? avsApprovalCode;
  String? avsMessage;
  String? zipCode;
  String? address1;
  String? address2;
}

class ReportTorResponse {
  ReportTorRecordType? recordType;
  String? reversalTimeStamp;
  String? hostResponseCode;
  String? hostResponseMessage;
  String? hostReferenceNumber;
  String? gatewayTransactionId;
  String? originalAmount;
  String? maskedPan;
  String? batchNumber;
  String? reversalAuthorizationCode;
  ReportTransactionType? originalTransactionType;
  String? originalTransactionDateTime;
  String? originalTransactionAuthorizationCode;
}

class ReportCheckResponse {
  ReportCheckSaleType? saleType;
  String? routingNumber;
  String? accountNumber;
  String? checkNumber;
  ReportCheckType? checkType;
  ReportCheckIdType? idType;
  String? idValue;
  String? birth;
  String? phoneNumber;
  String? zipCode;
}

class ReportCommercialResponse {
  String? poNumber;
  String? customerCode;
  ReportTaxExemptIndicator? taxExempt;
  String? taxExemptId;
  String? merchantTaxId;
  String? destinationZipCode;
  String? productDescription;
}

class ReportCashierResponse {
  String? clerkId;
  String? shiftId;
}

class ReportTraceResponse {
  String? referenceNumber;
  String? ecrReferenceNumber;
  String? timeStamp;
  String? invoiceNumber;
  String? paymentService2000;
  String? authorizationResponse;
  String? ecrTransactionId;
  String? hostTimeStamp;
}

class ReportAccountResponse {
  String? account;
  ReportEntryMode? entryMode;
  String? expireDate;
  ReportEbtCountType? ebtType;
  String? voucherNumber;
  String? currentAccountNumber;
  ReportCardType? cardType;
  String? cardHolder;
  String? cvdApprovalCode;
  String? cvdMessage;
  ReportCardPresentIndicator? cardPresentIndicator;
  ReportGiftCardType? giftCardType;
  ReportDebitAccountType? debitAccountType;
  String? hostAccount;
  String? hostCardType;
  String? track1Data;
  String? track2Data;
  String? track3Data;
}

class ReportAmountResponse {
  String? approvedAmount;
  String? amountDue;
  String? tipAmount;
  String? cashBackAmount;
  String? merchantFee;
  String? taxAmount;
  String? balance1;
  String? balance2;
  String? serviceFee;
  String? transactionRemainingAmount;
  String? approvedTipAmount;
  String? approvedCashBackAmount;
  String? approvedMerchantFee;
  String? approvedTaxAmount;
}

class ReportHostResponse {
  String? hostResponseCode;
  String? hostResponseMessage;
  String? authorizationCode;
  String? hostReferenceNumber;
  String? traceNumber;
  String? batchNumber;
  String? transactionIdentifier;
  String? gatewayTransactionId;
  String? hostDetailedMessage;
  String? transactionIntegrityClass;
  String? retrievalReferenceNumber;
  String? issuerResponseCode;
  String? paymentAccountReferenceId;
}

class ReportHostDetailReportResponse {
  String? responseCode;
  String? responseMessage;
  ReportHostResponse? hostInformation;
  ReportEdcType? edcType;
  ReportTransactionType? transactionType;
  ReportTransactionType? originalTransactionType;
  ReportAmountResponse? amountInformation;
  ReportAccountResponse? accountInformation;
  ReportTraceResponse? traceInformation;
  ReportCashierResponse? cashierInformation;
  ReportCommercialResponse? commercialInformation;
  ReportCheckResponse? checkInformation;
  ReportTorResponse? torInformation;
  ReportAvsResponse? avsInformation;
  ReportMotoECommerceResponse? motoECommerceInformation;
}

class ReportGiftTotals {
  String? saleCount;
  String? saleAmount;
  String? authorizationCount;
  String? authorizationAmount;
  String? postAuthorizationCount;
  String? postAuthorizationAmount;
  String? activateCount;
  String? activateAmount;
  String? issueCount;
  String? issueAmount;
  String? addCount;
  String? addAmount;
  String? returnCount;
  String? returnAmount;
  String? forcedCount;
  String? forcedAmount;
  String? cashoutCount;
  String? cashoutAmount;
  String? deactivateCount;
  String? deactivateAmount;
  String? adjustCount;
  String? adjustAmount;
}

class ReportEbtTotals {
  String? saleCount;
  String? saleAmount;
  String? returnCount;
  String? returnAmount;
  String? withdrawalCount;
  String? withdrawalAmount;
  String? authorizationCount;
  String? authorizationAmount;
  String? postAuthorizationCount;
  String? postAuthorizationAmount;
}

class ReportLocalFailedReportResponse {
  String? responseCode;
  String? responseMessage;
  ReportHostResponse? hostInformation;
  ReportEdcType? edcType;
  ReportTransactionType? transactionType;
  ReportAmountResponse? amountInformation;
  ReportAccountResponse? accountInformation;
  ReportTraceResponse? traceInformation;
}

class ReportCheckTotals {
  String? saleCount;
  String? saleAmount;
  String? adjustCount;
  String? adjustAmount;
}

class ReportCardTotalAmount {
  String? visaAmount;
  String? masterCardAmount;
  String? amexAmount;
  String? dinersAmount;
  String? discoverAmount;
  String? jcbAmount;
  String? enRouteAmount;
  String? extendedAmount;
  String? visaFleetAmount;
  String? masterCardFleetAmount;
  String? fleetOneAmount;
  String? fleetwideAmount;
  String? fuelmanAmount;
  String? gascardAmount;
  String? voyagerAmount;
  String? wrightExpressAmount;
  String? interacAmount;
  String? cupAmount;
  String? maestroAmount;
  String? sinclairAmount;
}

class ReportCreditTotals {
  String? saleCount;
  String? saleAmount;
  String? forcedCount;
  String? forcedAmount;
  String? returnCount;
  String? returnAmount;
  String? authorizationCount;
  String? authorizationAmount;
  String? postAuthorizationCount;
  String? postAuthorizationAmount;
}

class ReportEdcTotalAmount {
  String? creditAmount;
  String? debitAmount;
  String? ebtAmount;
  String? giftAmount;
  String? loyaltyAmount;
  String? cashAmount;
  String? checkAmount;
}

class ReportDebitTotals {
  String? saleCount;
  String? saleAmount;
  String? returnCount;
  String? returnAmount;
  String? authorizationCount;
  String? authorizationAmount;
  String? postAuthorizationCount;
  String? postAuthorizationAmount;
}

class ReportTotals {
  ReportCreditTotals? creditTotals;
  ReportDebitTotals? debitTotals;
  ReportEbtTotals? ebtTotals;
  ReportGiftTotals? giftTotals;
  ReportLoyaltyTotals? loyaltyTotals;
  ReportCashTotals? cashTotals;
  ReportCheckTotals? checkTotals;
}

class ReportLocalTotalReportResponse {
  String? responseCode;
  String? responseMessage;
  ReportEdcType? edcType;
  ReportTotals? totals;
}

class ReportEdcTotalCount {
  String? creditCount;
  String? debitCount;
  String? ebtCount;
  String? giftCount;
  String? loyaltyCount;
  String? cashCount;
  String? checkCount;
}

class ReportHistoryReportResponse {
  String? responseCode;
  String? responseMessage;
  ReportEdcTotalCount? edcTotalCount;
  ReportEdcTotalAmount? edcTotalAmount;
  String? timeStamp;
  String? batchNumber;
}

class ReportCardTotalCount {
  String? visaCount;
  String? masterCardCount;
  String? amexCount;
  String? dinersCount;
  String? discoverCount;
  String? jcbCount;
  String? enRouteCount;
  String? extendedCount;
  String? visaFleetCount;
  String? masterCardFleetCount;
  String? fleetOneCount;
  String? fleetwideCount;
  String? fuelmanCount;
  String? gascardCount;
  String? voyagerCount;
  String? wrightExpressCount;
  String? interacCount;
  String? cupCount;
  String? maestroCount;
  String? sinclairCount;
}

class ReportSafSummaryReportResponse {
  String? responseCode;
  String? responseMessage;
  ReportCardTotalCount? cardTotalCount;
  ReportCardTotalAmount? cardTotalAmount;
}

class ReportFleetCardResponse {
  String? odometer;
  String? vehicleNumber;
  String? jobNumber;
  String? driverId;
  String? employeeNumber;
  String? licenseNumber;
  String? jobId;
  String? departmentNumber;
  String? customerData;
  String? userId;
  String? vehicleId;
}

class ReportReportEmvTag {
  String? tc;
  String? tvr;
  String? aid;
  String? tsi;
  String? atc;
  String? appLabel;
  String? appPreferName;
  String? iad;
  String? arc;
  String? cid;
  ReportCardholderVerificationMethod? cvm;
  String? arqc;
  String? panSequenceNumber;
}

class ReportCardInformation {
  String? cardBin;
  String? currentCardBin;
  ReportCardProgramType? programType;
  ReportHostProgramType? hostProgramType;
}

class ReportAdditionalResponseData {
  String? aci;
  String? transactionId;
  String? cardLevelResult;
  String? sourceReasonCode;
  String? bankNetData;
  String? posEntryModeChange;
  String? transactionEditErrorCode;
  String? discoverProcessCode;
  String? discoverPosEntry;
  String? discoverResponseCode;
  String? posData;
  String? discoverTransactionQualifier;
  String? discoverNrid;
  String? transmissionDatetime;
  String? originalStan;
  String? cvvErrorCode;
  String? xCodeResponse;
  String? authorizingNetworkId;
  String? termEntryCapable;
  String? posEntryMode;
  String? serviceCode;
  String? spendQInd;
  String? wltId;
  String? localDateTime;
  String? emvTags;
}

class ReportReportTransactionInformation {
  String? discountAmount;
  String? chargedAmount;
  ReportSignatureResponseStatus? signatureStatus;
  String? fps;
  String? fpsSignature;
  ReportFpsReceipt? fpsReceipt;
  String? token;
  String? hostReferenceNumber;
  String? sn;
  String? settlementDate;
  String? hostEchoData;
  ReportPinEntryStatus? pinStatusNumber;
  String? validationCode;
  ReportUserLanguage? userLanguageStatus;
  String? globalUid;
  ReportAdditionalResponseData? additionalResponseData;
}

class ReportRestaurant {
  String? tableNumber;
  String? guestNumber;
  String? ticketNumber;
}

class ReportLocalDetailReportResponse {
  String? responseCode;
  String? responseMessage;
  String? totalRecord;
  String? recordNumber;
  ReportHostResponse? hostInformation;
  ReportEdcType? edcType;
  ReportTransactionType? transactionType;
  ReportTransactionType? originalTransactionType;
  ReportAmountResponse? amountInformation;
  ReportAccountResponse? accountInformation;
  ReportTraceResponse? traceInformation;
  ReportCashierResponse? cashierInformation;
  ReportCommercialResponse? commercialInformation;
  ReportCheckResponse? checkInformation;
  ReportRestaurant? restaurant;
  ReportReportTransactionInformation? reportTransactionInformation;
  ReportCardInformation? cardInformation;
  ReportMultiMerchant? multiMerchant;
  ReportReportEmvTag? reportEmvTag;
  ReportFleetCardResponse? fleetCard;
  ReportTorResponse? torInformation;
}

enum ReportEdcType {
  NotSet,
  All,
  Credit,
  Debit,
  Ebt,
  Gift,
  Loyalty,
  Cash,
  Check,
}

enum ReportTransactionType {
  NotSet,
  Unknown,
  Sale,
  Return,
  Authorization,
  PostAuthorization,
  ForceAuthorization,
  Adjust,
  Withdrawal,
  Activate,
  Issue,
  Reload,
  Cashout,
  Deactivate,
  Replace,
  Merge,
  ReportLost,
  Void,
  VoidSale,
  VoidReturn,
  VoidAuthorization,
  VoidPostAuthorization,
  VoidForceAuthorization,
  VoidWithdrawal,
  Inquiry,
  Verify,
  Reactivate,
  ForcedIssue,
  ForcedAdd,
  Unload,
  Renew,
  GetConvertDetail,
  Convert,
  Tokenize,
  IncrementalAuthorization,
  BalanceWithLock,
  RedemptionWithUnlock,
  Rewards,
  Reenter,
  TransactionAdjustment,
  Transfer,
  Finalize,
  Deposit,
  AccountPayment,
  Reversal,
}

enum ReportEntryMode {
  NotSet,
  Manual,
  Swipe,
  Contactless,
  LaserScanner,
  Chip,
  ChipFallBackSwipe,
  FrontCamera,
  RearCamera,
}

enum ReportEbtCountType {
  NotSet,
  CashBenefits,
  FoodStamp,
  Voucher,
  Ewic,
  EwicVoucher,
}

enum ReportCardType {
  NotSet,
  Visa,
  MasterCard,
  Amex,
  Discover,
  DinerClub,
  EnRoute,
  Jcb,
  RevolutionCard,
  VisaFleet,
  MasterCardFleet,
  FleetOne,
  Fleetwide,
  Fuelman,
  Gascard,
  Voyager,
  WrightExpress,
  Interac,
  Cup,
  Maestro,
  Sinclair,
  Other,
}

enum ReportCardPresentIndicator {
  NotSet,
  CardPresent,
  CardNotPresent,
}

enum ReportGiftCardType {
  NotSet,
  CustomValueGiftCard,
  PredetermineValueGiftCard,
}

enum ReportDebitAccountType {
  NotSet,
  Checking,
  Saving,
  Default,
}

enum ReportTaxExemptIndicator {
  NotSet,
  NotExempt,
  Exempt,
}

enum ReportCheckSaleType {
  NotSet,
  Verification,
  Conversion,
  Guarantee,
}

enum ReportCheckType {
  NotSet,
  Personal,
  Business,
  Government,
  TwoParty,
}

enum ReportCheckIdType {
  NotSet,
  DriverLicense,
  Ssn,
  MilitaryId,
  CourtesyCard,
  ProprietaryCard,
  PassportNumber,
}

enum ReportSignatureResponseStatus {
  NotSet,
  LocalCaptured,
  Aborted,
  Timeout,
  NotAvailable,
  SuccessfullyUploaded,
  FailedDuringUploading,
}

enum ReportFpsReceipt {
  NotSet,
  MerchantOnly,
  CustomerOnly,
  NoReceipt,
}

enum ReportPinEntryStatus {
  NotSet,
  PinBypassed,
  PinVerified,
}

enum ReportUserLanguage {
  NotSet,
  EnglishUs,
  French,
  Chinese,
  Lithuanian,
  EnglishUk,
}

enum ReportCardProgramType {
  NotSet,
  RegularCard,
  CommercialCard,
  FsaCard,
  FleetCard,
}

enum ReportHostProgramType {
  NotSet,
  Regular,
  Commercial,
  HsaCard,
  FsaCard,
  HraCard,
  Fleet,
  Unknown,
}

enum ReportCardholderVerificationMethod {
  NotSet,
  FailCvmProcessing,
  PlaintextOfflinePinVerification,
  OnlinePin,
  PlaintextOfflinePinAndSignature,
  EncipheredOfflinePinVerification,
  EncipheredOfflinePinVerificationAndSignature,
  Signature,
  NoCvmRequired,
  OnDeviceCvm,
}

enum ReportTorRecordType {
  NotSet,
  ReversalRecord,
  EmvSecondGacReversal,
}

enum ReportMotoECommerceMode {
  NotSet,
  MailOrderMode,
  TeleOrderMode,
  ECommerceMode,
}

enum ReportMotoECommerceTransactionType {
  NotSet,
  SingleTransaction,
  Installment,
  RecurringTransaction,
}

enum ReportMotoECommerceSecureType {
  NotSet,
  NonSecure,
  SecureTransaction,
}

enum ReportSafReportIndicator {
  NotSet,
  NewRecordReport,
  FailedRecordReport,
  All,
}

enum ReportLastTransaction {
  NotSet,
  NotRetrieve,
  Retrieve,
}

enum ReportTransactionResultType {
  NotSet,
  SuccessfulOnly,
  FailedOnly,
  All,
}

@HostApi()
abstract class POSLinkReportApi {
   @async
   ReportHostReportResponse hostReport(ReportHostReportRequest req);
   @async
   ReportHistoryReportResponse historyReport(ReportHistoryReportRequest req);
   @async
   ReportSafSummaryReportResponse safSummaryReport(ReportSafSummaryReportRequest req);
   @async
   ReportLocalFailedReportResponse localFailedReport(ReportLocalFailedReportRequest req);
   @async
   ReportLocalDetailReportResponse localDetailReport(ReportLocalDetailReportRequest req);
   @async
   ReportHostDetailReportResponse hostDetailReport(ReportHostDetailReportRequest req);
   @async
   ReportLocalTotalReportResponse localTotalReport(ReportLocalTotalReportRequest req);
}
